package de.se2.sharebox.classes;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * @author Gruppe 10
 *
 */
public class FileJUnit
{
	private File file;
	private UserAccount userAccount;
	
	@Before
	public void setUp () 
	{
		userAccount = new UserAccount("Taty", "taty@test.de", "taty");
		file = new File("test", userAccount, 5);
	}
	
	@Test
	public void testUpload() 
	{
		assertTrue(file.upload());
	}
	
	@Test
	public void testDownload() 
	{
		assertTrue(file.download());
	}
	
	@Test
	public void testClone() 
	{
		assertEquals(file, file.clone());
	}
	
	@After
	public void resetGlobal () {
		file = null;
	}
}
